package ar.com.vates.ejercicio2;

public class ThreadAdd implements Runnable {
	private Contenedor con = null;
	public ThreadAdd(Contenedor c){
		con = c;
	}
	
	public void run() {
		for (int i = 0; i < 10; i++) {
			
			try {
				int sleep = (int)(Math.random()*500)+100;
				Thread.sleep(sleep);
			} catch (InterruptedException e) {
				
				e.printStackTrace();
			}
			int numero = (int)(Math.random()*10)+1;
			con.editar(numero);
		}
		
	}

}
